//---------------------------------------------------------------------------

#include <vcl.h>
#pragma hdrstop

#include "FrmNewSpoud.h"
#include "MyData.h"
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma resource "*.dfm"
TFormNewSpoud *FormNewSpoud;

extern MyData* mydat;

//---------------------------------------------------------------------------
__fastcall TFormNewSpoud::TFormNewSpoud(TComponent* Owner)
        : TForm(Owner)
{
}
//---------------------------------------------------------------------------
void __fastcall TFormNewSpoud::Button1Click(TObject *Sender)
{
mydat->new_foitit.onoma=Edit1->Text;
mydat->new_foitit.eponimo=Edit2->Text;
mydat->new_foitit.patronimo =Edit3->Text;
//apo to sistima// mydat->new_foitit.am =Edit4->Text;
//apo to sistima// mydat->new_foitit.am_math =Edit5->Text;
mydat->new_foitit.odeio=Edit6->Text;
mydat->new_foitit.odos_odeiou=Edit7->Text;
this->Close();
}

//xrisimi gia tin emfanisi tou neou id tis gramateias
void My_update_form(TFormNewSpoud *mform){

mform->Edit4->Text=mydat->new_foitit.am;
mform->Edit5->Text=mydat->new_foitit.am_math;

 }

//---------------------------------------------------------------------------
void __fastcall TFormNewSpoud::FormCreate(TObject *Sender)
{
 My_update_form(this);
}
//---------------------------------------------------------------------------
